//
//  MyLiuShuiTableViewCell.m
//  明和智能
//
//  Created by 李李善 on 2018/8/24.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "MyLiuShuiTableViewCell.h"

@implementation MyLiuShuiTableViewCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    
    self.textLabel.text = @"停车消费";
    self.textLabel.font = kSysFont(kFitW(13));
    self.textLabel.textColor = [UIColor blackColor];
    
    self.detailLabel.text = @"2018-08-24";
    self.detailLabel.font = kSysFont(kFitW(13));
    self.detailLabel.textColor = hexCOLOR(@"A3A3A3");
    
    
    UILabel *money = ({
        UILabel *l  = [UILabel new];
        l.textColor = [UIColor blackColor];
        l.text = @"-30¥";
        l.font = kSysFont(kFitW(13));
        [view addV:l];
        l;
    });
    UILabel *title = ({
        UILabel *l  = [UILabel new];
        l.text = @"微信支付";
        l.font = kSysFont(kFitW(13));
        [view addV:l];
        l;
    });
    WSELF(weakSelf);
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [weakSelf.textLabel sizeToFit];
        weakSelf.textLabel.top = kFitH(12);
        weakSelf.textLabel.left = kFitW(15);
        
        [weakSelf.detailLabel sizeToFit];
        weakSelf.detailLabel.bottom = size.height - kFitH(12);
        weakSelf.detailLabel.left = kFitW(15);
        
        
        [money sizeToFit];
        money.top = kFitH(12);
        money.right = size.width - kFitW(15);
        
        
        [title sizeToFit];
        title.right = size.width - kFitW(15);
        title.bottom = size.height - kFitH(12);
    }];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
